/*
 * Container to hold an intersection.
 */

#pragma once

#include "Vector3f.h"
#include "Color3f.h"

class Intersection {
public:
    float t;
    Vector3f pos;
    //normal
    Vector3f n;
    //shading normal
    Vector3f n_s;

    //No intersection.
    Intersection();

    //Position and normal.
    Intersection(float t, const Vector3f& pos, const Vector3f& n);

    //Position and normal.
    Intersection(float t, const Vector3f& pos, const Vector3f& n, const Vector3f& n_s);

    bool exists() const;

    bool operator<(const Intersection& intersection) const;
    bool operator<=(const Intersection& intersection) const;
};
